﻿using Spring.Context;
using Spring.Context.Support;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SpringNetDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            //IUserInfoDal dal = new EFUserInfoDal();
            //dal.Name = "yokin";
            //dal.Show();

            IApplicationContext ctx = ContextRegistry.GetContext();

            //IUserInfoDal dal = (IUserInfoDal)ctx.GetObject("UserInfoDal");
            //dal.Show();


            //IUserInfoDal NHdal = (IUserInfoDal)ctx.GetObject("NHUserInfoDal");
            //NHdal.Show();

            UserInfoService service = (UserInfoService)ctx.GetObject("UserInfoService");
            service.Show();

            Console.ReadKey();

        }
    }
}
